trigger OORSplitShare on Opportunity_Split__c (after insert,after update) {
    List<Opportunity_Split__c> OS = new List<Opportunity_Split__c>();
    Set<Id> DeleteShare = new Set<Id>();
    for(Opportunity_Split__c Oppspl:Trigger.new){
    If(Oppspl.Owner_ID__c != null && Oppspl.Owner_ID__c != Oppspl.OwnerId){
    If(TRIGGER.ISUPDATE){
        If(Oppspl.Owner_ID__c != trigger.oldMap.get(Oppspl.Id).Owner_ID__c){
            OS.add(Oppspl);
            DeleteShare.add(Oppspl.Id);
        }
       }
      If(TRIGGER.ISINSERT){
          OS.add(Oppspl);
      }
      }
    }
    If(OS.size()>0){
    OpptySplitSharingClass OSshareClass = new OpptySplitSharingClass();
    OSshareClass.OpptyShare(OS,DeleteShare);
    //OSshareClass.DeleteOpptyShare(DeleteShare);
    }
}